package com.johann.algorithm.divideandconquer;
/*
* n=0 时；F(n)=0
* n=1 时；F(n)=1
* n>1 时；F(n)=F(n-1)+F(n-2);
* */

public class Fibonacci {
    public static final int A_MAX= Integer.MAX_VALUE;
    public static int fibonacci(int n){
        if(n<0) return -1;
        else if(n==0) return 0;
        else if(n==1) return 1;
        else  return fibonacci(n-1)+fibonacci(n-2);
    }

    public static void main(String[] args) {
        int a=26;
        System.out.println(fibonacci(a));
    }

}
